3.5.78 \(\int \sec (c+d x) (a+b \sec (c+d x))^4 \, dx\) [478]

Optimal. Leaf size=146 \[ \frac {\left (8 a^4+24 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a b \left (19 a^2+16 b^2\right ) \tan (c+d x)}{6 d}+\frac {b^2 \left (26 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {7 a b (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d} \]

[Out]

1/8*(8*a^4+24*a^2*b^2+3*b^4)*arctanh(sin(d*x+c))/d+1/6*a*b*(19*a^2+16*b^2)*tan(d*x+c)/d+1/24*b^2*(26*a^2+9*b^2
)*sec(d*x+c)*tan(d*x+c)/d+7/12*a*b*(a+b*sec(d*x+c))^2*tan(d*x+c)/d+1/4*b*(a+b*sec(d*x+c))^3*tan(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 146, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3915, 4087, 4082, 3872, 3855, 3852, 8} \begin {gather*} \frac {a b \left (19 a^2+16 b^2\right ) \tan (c+d x)}{6 d}+\frac {b^2 \left (26 a^2+9 b^2\right ) \tan (c+d x) \sec (c+d x)}{24 d}+\frac {\left (8 a^4+24 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}+\frac {7 a b \tan (c+d x) (a+b \sec (c+d x))^2}{12 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]*(a + b*Sec[c + d*x])^4,x]

[Out]

((8*a^4 + 24*a^2*b^2 + 3*b^4)*ArcTanh[Sin[c + d*x]])/(8*d) + (a*b*(19*a^2 + 16*b^2)*Tan[c + d*x])/(6*d) + (b^2
*(26*a^2 + 9*b^2)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + (7*a*b*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (b*
(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3915

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-b)*Cot[e + f*x]*(
(a + b*Csc[e + f*x])^(m - 1)/(f*m)), x] + Dist[1/m, Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m - 2)*(b^2*(m - 1)
 + a^2*m + a*b*(2*m - 1)*Csc[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] &&
IntegerQ[2*m]

Rule 4082

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.
) + (A_)), x_Symbol] :> Simp[(-b)*B*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*(n + 1))), x] + Dist[1/(n + 1), Int[(d
*Csc[e + f*x])^n*Simp[A*a*(n + 1) + B*b*n + (A*b + B*a)*(n + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e,
 f, A, B}, x] && NeQ[A*b - a*B, 0] &&  !LeQ[n, -1]

Rule 4087

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_))
, x_Symbol] :> Simp[(-B)*Cot[e + f*x]*((a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Dist[1/(m + 1), Int[Csc[e + f
*x]*(a + b*Csc[e + f*x])^(m - 1)*Simp[b*B*m + a*A*(m + 1) + (a*B*m + A*b*(m + 1))*Csc[e + f*x], x], x], x] /;
FreeQ[{a, b, A, B, e, f}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0]

Rubi steps

\begin {align*} \int \sec (c+d x) (a+b \sec (c+d x))^4 \, dx &=\frac {b (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{4} \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (4 a^2+3 b^2+7 a b \sec (c+d x)\right ) \, dx\\ &=\frac {7 a b (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{12} \int \sec (c+d x) (a+b \sec (c+d x)) \left (a \left (12 a^2+23 b^2\right )+b \left (26 a^2+9 b^2\right ) \sec (c+d x)\right ) \, dx\\ &=\frac {b^2 \left (26 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {7 a b (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{24} \int \sec (c+d x) \left (3 \left (8 a^4+24 a^2 b^2+3 b^4\right )+4 a b \left (19 a^2+16 b^2\right ) \sec (c+d x)\right ) \, dx\\ &=\frac {b^2 \left (26 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {7 a b (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{6} \left (a b \left (19 a^2+16 b^2\right )\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{8} \left (8 a^4+24 a^2 b^2+3 b^4\right ) \int \sec (c+d x) \, dx\\ &=\frac {\left (8 a^4+24 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b^2 \left (26 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {7 a b (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}-\frac {\left (a b \left (19 a^2+16 b^2\right )\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{6 d}\\ &=\frac {\left (8 a^4+24 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a b \left (19 a^2+16 b^2\right ) \tan (c+d x)}{6 d}+\frac {b^2 \left (26 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {7 a b (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.55, size = 101, normalized size = 0.69 \begin {gather*} \frac {3 \left (8 a^4+24 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))+b \tan (c+d x) \left (9 b \left (8 a^2+b^2\right ) \sec (c+d x)+6 b^3 \sec ^3(c+d x)+32 a \left (3 \left (a^2+b^2\right )+b^2 \tan ^2(c+d x)\right )\right )}{24 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]*(a + b*Sec[c + d*x])^4,x]

[Out]

(3*(8*a^4 + 24*a^2*b^2 + 3*b^4)*ArcTanh[Sin[c + d*x]] + b*Tan[c + d*x]*(9*b*(8*a^2 + b^2)*Sec[c + d*x] + 6*b^3
*Sec[c + d*x]^3 + 32*a*(3*(a^2 + b^2) + b^2*Tan[c + d*x]^2)))/(24*d)

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 147, normalized size = 1.01

method result size
derivativedivides \(\frac {a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 b \,a^{3} \tan \left (d x +c \right )+6 b^{2} a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 b^{3} a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+b^{4} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(147\)
default \(\frac {a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 b \,a^{3} \tan \left (d x +c \right )+6 b^{2} a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 b^{3} a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+b^{4} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(147\)
norman \(\frac {-\frac {b \left (32 a^{3}-24 b \,a^{2}+32 b^{2} a -5 b^{3}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {b \left (32 a^{3}+24 b \,a^{2}+32 b^{2} a +5 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {b \left (288 a^{3}-72 b \,a^{2}+160 b^{2} a +9 b^{3}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {b \left (288 a^{3}+72 b \,a^{2}+160 b^{2} a -9 b^{3}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {\left (8 a^{4}+24 b^{2} a^{2}+3 b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {\left (8 a^{4}+24 b^{2} a^{2}+3 b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) \(249\)
risch \(-\frac {i b \left (72 b \,a^{2} {\mathrm e}^{7 i \left (d x +c \right )}+9 b^{3} {\mathrm e}^{7 i \left (d x +c \right )}-96 a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+72 a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}+33 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-288 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-192 a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-72 b \,a^{2} {\mathrm e}^{3 i \left (d x +c \right )}-33 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-288 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-256 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-72 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-9 b^{3} {\mathrm e}^{i \left (d x +c \right )}-96 a^{3}-64 b^{2} a \right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2} a^{2}}{d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{4}}{8 d}-\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2} a^{2}}{d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{4}}{8 d}\) \(353\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)*(a+b*sec(d*x+c))^4,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^4*ln(sec(d*x+c)+tan(d*x+c))+4*b*a^3*tan(d*x+c)+6*b^2*a^2*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+t
an(d*x+c)))-4*b^3*a*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+b^4*(-(-1/4*sec(d*x+c)^3-3/8*sec(d*x+c))*tan(d*x+c)+3/8
*ln(sec(d*x+c)+tan(d*x+c))))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 180, normalized size = 1.23 \begin {gather*} \frac {64 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a b^{3} - 3 \, b^{4} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 72 \, a^{2} b^{2} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, a^{4} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 192 \, a^{3} b \tan \left (d x + c\right )}{48 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sec(d*x+c))^4,x, algorithm="maxima")

[Out]

1/48*(64*(tan(d*x + c)^3 + 3*tan(d*x + c))*a*b^3 - 3*b^4*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^
4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 72*a^2*b^2*(2*sin(d*x + c)/(s
in(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 48*a^4*log(sec(d*x + c) + tan(d*x + c))
+ 192*a^3*b*tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 2.59, size = 163, normalized size = 1.12 \begin {gather*} \frac {3 \, {\left (8 \, a^{4} + 24 \, a^{2} b^{2} + 3 \, b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (8 \, a^{4} + 24 \, a^{2} b^{2} + 3 \, b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (32 \, a b^{3} \cos \left (d x + c\right ) + 6 \, b^{4} + 32 \, {\left (3 \, a^{3} b + 2 \, a b^{3}\right )} \cos \left (d x + c\right )^{3} + 9 \, {\left (8 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sec(d*x+c))^4,x, algorithm="fricas")

[Out]

1/48*(3*(8*a^4 + 24*a^2*b^2 + 3*b^4)*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 3*(8*a^4 + 24*a^2*b^2 + 3*b^4)*cos
(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*(32*a*b^3*cos(d*x + c) + 6*b^4 + 32*(3*a^3*b + 2*a*b^3)*cos(d*x + c)^3
+ 9*(8*a^2*b^2 + b^4)*cos(d*x + c)^2)*sin(d*x + c))/(d*cos(d*x + c)^4)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right )^{4} \sec {\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sec(d*x+c))**4,x)

[Out]

Integral((a + b*sec(c + d*x))**4*sec(c + d*x), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 360 vs. \(2 (136) = 272\).
time = 0.46, size = 360, normalized size = 2.47 \begin {gather*} \frac {3 \, {\left (8 \, a^{4} + 24 \, a^{2} b^{2} + 3 \, b^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (8 \, a^{4} + 24 \, a^{2} b^{2} + 3 \, b^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (96 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 96 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 288 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 160 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 9 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 288 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 160 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 96 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 96 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sec(d*x+c))^4,x, algorithm="giac")

[Out]

1/24*(3*(8*a^4 + 24*a^2*b^2 + 3*b^4)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*(8*a^4 + 24*a^2*b^2 + 3*b^4)*log(a
bs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(96*a^3*b*tan(1/2*d*x + 1/2*c)^7 - 72*a^2*b^2*tan(1/2*d*x + 1/2*c)^7 + 96*a*
b^3*tan(1/2*d*x + 1/2*c)^7 - 15*b^4*tan(1/2*d*x + 1/2*c)^7 - 288*a^3*b*tan(1/2*d*x + 1/2*c)^5 + 72*a^2*b^2*tan
(1/2*d*x + 1/2*c)^5 - 160*a*b^3*tan(1/2*d*x + 1/2*c)^5 - 9*b^4*tan(1/2*d*x + 1/2*c)^5 + 288*a^3*b*tan(1/2*d*x
+ 1/2*c)^3 + 72*a^2*b^2*tan(1/2*d*x + 1/2*c)^3 + 160*a*b^3*tan(1/2*d*x + 1/2*c)^3 - 9*b^4*tan(1/2*d*x + 1/2*c)
^3 - 96*a^3*b*tan(1/2*d*x + 1/2*c) - 72*a^2*b^2*tan(1/2*d*x + 1/2*c) - 96*a*b^3*tan(1/2*d*x + 1/2*c) - 15*b^4*
tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d

________________________________________________________________________________________

Mupad [B]
time = 4.92, size = 245, normalized size = 1.68 \begin {gather*} \frac {\left (-8\,a^3\,b+6\,a^2\,b^2-8\,a\,b^3+\frac {5\,b^4}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (24\,a^3\,b-6\,a^2\,b^2+\frac {40\,a\,b^3}{3}+\frac {3\,b^4}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-24\,a^3\,b-6\,a^2\,b^2-\frac {40\,a\,b^3}{3}+\frac {3\,b^4}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (8\,a^3\,b+6\,a^2\,b^2+8\,a\,b^3+\frac {5\,b^4}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (2\,a^4+6\,a^2\,b^2+\frac {3\,b^4}{4}\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(c + d*x))^4/cos(c + d*x),x)

[Out]

(tan(c/2 + (d*x)/2)*(8*a*b^3 + 8*a^3*b + (5*b^4)/4 + 6*a^2*b^2) - tan(c/2 + (d*x)/2)^7*(8*a*b^3 + 8*a^3*b - (5
*b^4)/4 - 6*a^2*b^2) - tan(c/2 + (d*x)/2)^3*((40*a*b^3)/3 + 24*a^3*b - (3*b^4)/4 + 6*a^2*b^2) + tan(c/2 + (d*x
)/2)^5*((40*a*b^3)/3 + 24*a^3*b + (3*b^4)/4 - 6*a^2*b^2))/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^2
- 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1)) + (atanh(tan(c/2 + (d*x)/2))*(2*a^4 + (3*b^4)/4 + 6*a^2*
b^2))/d

________________________________________________________________________________________